package cloud.daodao.storm.common.dict.model.codemap;


import cloud.daodao.storm.common.serialize.Serializer;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * @author DaoDao
 */
@Schema(title = "CodeMapSearch", description = "代码映射搜索")
@Data
public class CodeMapSearch implements Serializer {

    @Schema(title = "ID", description = "ID", example = "1")
    @Min(value = 1)
    @Max(value = Long.MAX_VALUE)
    private Long id;

    @Schema(title = "编码", description = "编码", example = "demo")
    @Size(min = 1, max = 32)
    private String code;

    @Schema(title = "名称", description = "名称", example = "示例")
    @Size(min = 1, max = 32)
    private String name;

    @Schema(title = "键", description = "键", example = "abc")
    @Size(min = 1, max = 32)
    private String key;

    @Schema(title = "值", description = "值", example = "123")
    @Size(min = 1, max = 64)
    private String value;

    @Schema(title = "排序", description = "排序", example = "1")
    @Min(value = 1)
    @Max(value = Integer.MAX_VALUE)
    private Integer sort;

    @Schema(title = "注释", description = "注释", example = "注释")
    private String note;

    @Schema(title = "是否有效", description = "是否有效", example = "true")
    private Boolean valid;

}
